﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" AutoEventWireup="true" CodeBehind="ViewEvent.aspx.cs" Inherits="LizzabethBrownRealEstate.Views.Users.ViewEvent" %>
<%@ Import Namespace="LizzabethBrownRealEstate.Models" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ScriptPlaceHolder" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContentPlaceHolder" runat="server">
    <div class="contentDiv" style="margin-left:20%">
        <% LBRDataContext dc = new LBRDataContext();  %>
        <% Event e = dc.GetEvent(int.Parse(ViewData["EventId"].ToString()));  %>
        <fieldset id="fldRegister" style="width:450px;display:block;">
            <legend><%= e.Title %></legend>
            <table>
                <tr class="addPropertyRow">
                    <td class="addPropertyLabel"><label class="label">Start:&nbsp;</label></td>
                    <td class="addPropertyField"><label class="label"><%= e.EventStart.Value.ToShortDateString() + "&nbsp;" + e.EventStart.Value.ToShortTimeString() %> </label></td>
                </tr>
                <tr class="addPropertyRow">
                    <td class="addPropertyLabel"><label class="label">End:&nbsp;</label></td>
                    <td class="addPropertyField"><label class="label"><%= e.EventEnd.Value.ToShortDateString() + "&nbsp;" + e.EventEnd.Value.ToShortTimeString()%></label></td>
                </tr>
                <tr class="addPropertyRow">
                    <td style="vertical-align:top" class="addPropertyLabel"><label class="label" for="Phone">Description:&nbsp;</label></td>
                    <% object o = new { _readonly = "true", _class="label", style="overflow:auto; background-color:Transparent; border-style:none;" }; %>
                    <td class="addPropertyField" colspan="3"><%= Html.TextArea("Description", e.Description, 3, 35, o) %></td>
                </tr>
            </table>
        </fieldset>
        <div style="margin-top:15px; margin-bottom:15px">
            <button onclick="window.history.back(); return false;">Return</button>
        </div>
    </div>
</asp:Content>
